<template>
<!--:default-openeds="opens"-->
    <el-menu
             style="height: 100%;overflow: hidden;"
             background-color="#001528"
             text-color="#fff"
             router
             :collapse-transition="false"
             :collapse="isCollapse"
             :unique-opened="true"
    >
        <div style="height: 60px;line-height: 60px;text-align: center;">
            <img src="../assets/logo.png" style="width: 20px;position: relative;top: 5px" alt="">
            <b style="color:white" v-show="logoTextShow">后台管理系统</b>
        </div>
        <Menu-tree :menu-data="menus"></Menu-tree>
    </el-menu>

</template>

<script>
    import MenuTree from "@/components/MenuTree";

    export default {
        name: "Aside",
        components: {MenuTree},
        props: {
            isCollapse: Boolean,
            logoTextShow: Boolean,
        },
        data() {
            //这里存放数据
            return {
                menus: localStorage.getItem("menus") ? JSON.parse(localStorage.getItem("menus")) : [],
                opens: localStorage.getItem("menus") ? JSON.parse(localStorage.getItem("menus")).map(v => v.id + '') : []
            };
        },
    };
</script>
<style scoped>

</style>
